home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 May: Tool Chest / Dev.CD May 00 TC.toast / pc / tool chest / macapp / macapp r14d5 / install macapp r14d5 / Apple Frameworks / WASTE / Source / WEUserSelectors.c < prev    next >
MacBinary  |  2000-02-25  |  2.1 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Fri Feb 25 05:00:00 2000, modified Fri Feb 25 05:00:00 2000, creator 'CWIE', type ASCII, 1578 bytes "WEUserSelectors.c" , at 0x6aa 286 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 57 45 55 73 65 72 | 53 65 6c 65 63 74 6f 72 |..WEUser|Selector|
|00000010| 73 2e 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.c.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 06 2a 00 | 00 01 1e b4 dc 03 20 b4 |......*.|...... .|
|00000060| dc 03 20 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.. .....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 79 15 00 00 |........|....y...|
|00000080| 2f 2a 0d 20 2a 09 57 45 | 55 73 65 72 53 65 6c 65 |/*. *.WE|UserSele|
|00000090| 63 74 6f 72 73 2e 63 0d | 20 2a 0d 20 2a 09 57 41 |ctors.c.| *. *.WA|
|000000a0| 53 54 45 20 50 52 4f 4a | 45 43 54 0d 20 2a 20 20 |STE PROJ|ECT. * |
|000000b0| 52 6f 75 74 69 6e 65 73 | 20 66 6f 72 20 68 61 6e |Routines| for han|
|000000c0| 67 69 6e 67 20 75 73 65 | 72 2d 64 65 66 69 6e 65 |ging use|r-define|
|000000d0| 64 20 74 61 67 67 65 64 | 20 64 61 74 61 20 74 6f |d tagged| data to|
|000000e0| 20 61 20 57 41 53 54 45 | 20 69 6e 73 74 61 6e 63 | a WASTE| instanc|
|000000f0| 65 0d 20 2a 0d 20 2a 20 | 20 43 6f 70 79 72 69 67 |e. *. * | Copyrig|
|00000100| 68 74 20 28 63 29 20 31 | 39 39 33 2d 31 39 39 38 |ht (c) 1|993-1998|
|00000110| 20 4d 61 72 63 6f 20 50 | 69 6f 76 61 6e 65 6c 6c | Marco P|iovanell|
|00000120| 69 0d 20 2a 09 41 6c 6c | 20 52 69 67 68 74 73 20 |i. *.All| Rights |
|00000130| 52 65 73 65 72 76 65 64 | 0d 20 2a 0d 20 2a 20 20 |Reserved|. *. * |
|00000140| 43 20 70 6f 72 74 20 62 | 79 20 44 61 6e 20 43 72 |C port b|y Dan Cr|
|00000150| 65 76 69 65 72 0d 20 2a | 0d 20 2a 2f 0d 0d 0d 23 |evier. *|. */...#|
|00000160| 69 6e 63 6c 75 64 65 20 | 22 57 41 53 54 45 49 6e |include |"WASTEIn|
|00000170| 74 66 2e 68 22 0d 0d 70 | 61 73 63 61 6c 20 4f 53 |tf.h"..p|ascal OS|
|00000180| 45 72 72 20 57 45 53 65 | 74 55 73 65 72 49 6e 66 |Err WESe|tUserInf|
|00000190| 6f 20 28 20 57 45 53 65 | 6c 65 63 74 6f 72 20 74 |o ( WESe|lector t|
|000001a0| 61 67 2c 20 53 49 6e 74 | 33 32 20 75 73 65 72 49 |ag, SInt|32 userI|
|000001b0| 6e 66 6f 2c 20 57 45 48 | 61 6e 64 6c 65 20 68 57 |nfo, WEH|andle hW|
|000001c0| 45 20 29 0d 7b 0d 09 48 | 61 6e 64 6c 65 20 68 55 |E ).{..H|andle hU|
|000001d0| 73 65 72 49 6e 66 6f 20 | 3d 20 28 20 2a 20 68 57 |serInfo |= ( * hW|
|000001e0| 45 20 29 20 2d 3e 20 68 | 55 73 65 72 49 6e 66 6f |E ) -> h|UserInfo|
|000001f0| 20 3b 0d 09 57 45 55 73 | 65 72 49 6e 66 6f 45 6e | ;..WEUs|erInfoEn|
|00000200| 74 72 79 20 2a 20 70 45 | 6e 74 72 79 20 3b 0d 09 |try * pE|ntry ;..|
|00000210| 57 45 55 73 65 72 49 6e | 66 6f 45 6e 74 72 79 20 |WEUserIn|foEntry |
|00000220| 65 6e 74 72 79 20 3b 0d | 09 4f 53 45 72 72 20 65 |entry ;.|.OSErr e|
|00000230| 72 72 20 3d 20 6e 6f 45 | 72 72 20 3b 0d 0d 09 2f |rr = noE|rr ;.../|
|00000240| 2f 09 6c 6f 6f 6b 20 66 | 6f 72 20 74 68 65 20 73 |/.look f|or the s|
|00000250| 70 65 63 69 66 69 65 64 | 20 74 61 67 20 69 6e 20 |pecified| tag in |
|00000260| 74 68 65 20 75 73 65 72 | 20 69 6e 66 6f 20 61 72 |the user| info ar|
|00000270| 72 61 79 0d 09 66 6f 72 | 20 28 09 70 45 6e 74 72 |ray..for| (.pEntr|
|00000280| 79 20 3d 20 28 20 57 45 | 55 73 65 72 49 6e 66 6f |y = ( WE|UserInfo|
|00000290| 45 6e 74 72 79 20 2a 20 | 29 20 2a 20 68 55 73 65 |Entry * |) * hUse|
|000002a0| 72 49 6e 66 6f 20 3b 0d | 09 09 09 70 45 6e 74 72 |rInfo ;.|...pEntr|
|000002b0| 79 20 2d 3e 20 74 61 67 | 20 21 3d 20 30 20 3b 0d |y -> tag| != 0 ;.|
|000002c0| 09 09 09 70 45 6e 74 72 | 79 20 2b 2b 20 29 0d 09 |...pEntr|y ++ )..|
|000002d0| 7b 0d 09 09 69 66 20 28 | 20 70 45 6e 74 72 79 20 |{...if (| pEntry |
|000002e0| 2d 3e 20 74 61 67 20 3d | 3d 20 74 61 67 20 29 0d |-> tag =|= tag ).|
|000002f0| 09 09 7b 0d 09 09 09 2f | 2f 09 74 61 67 20 66 6f |..{..../|/.tag fo|
|00000300| 75 6e 64 3a 20 73 61 76 | 65 20 74 68 65 20 75 73 |und: sav|e the us|
|00000310| 65 72 20 69 6e 66 6f 20 | 61 6e 64 20 72 65 74 75 |er info |and retu|
|00000320| 72 6e 0d 09 09 09 70 45 | 6e 74 72 79 20 2d 3e 20 |rn....pE|ntry -> |
|00000330| 69 6e 66 6f 20 3d 20 75 | 73 65 72 49 6e 66 6f 20 |info = u|serInfo |
|00000340| 3b 0d 09 09 09 67 6f 74 | 6f 20 63 6c 65 61 6e 75 |;....got|o cleanu|
|00000350| 70 20 3b 0d 09 09 7d 0d | 09 7d 0d 0d 09 2f 2f 09 |p ;...}.|.}...//.|
|00000360| 75 6e 6b 6e 6f 77 6e 20 | 74 61 67 3a 20 61 64 64 |unknown |tag: add|
|00000370| 20 61 20 6e 65 77 20 65 | 6e 74 72 79 20 61 74 20 | a new e|ntry at |
|00000380| 74 68 65 20 65 6e 64 20 | 6f 66 20 74 68 65 20 61 |the end |of the a|
|00000390| 72 72 61 79 0d 09 65 6e | 74 72 79 20 2e 20 74 61 |rray..en|try . ta|
|000003a0| 67 20 3d 20 74 61 67 20 | 3b 0d 09 65 6e 74 72 79 |g = tag |;..entry|
|000003b0| 20 2e 20 69 6e 66 6f 20 | 3d 20 75 73 65 72 49 6e | . info |= userIn|
|000003c0| 66 6f 20 3b 0d 09 69 66 | 20 28 20 28 20 65 72 72 |fo ;..if| ( ( err|
|000003d0| 20 3d 20 5f 57 45 53 70 | 6c 69 63 65 20 28 20 68 | = _WESp|lice ( h|
|000003e0| 55 73 65 72 49 6e 66 6f | 2c 20 26 20 65 6e 74 72 |UserInfo|, & entr|
|000003f0| 79 2c 20 73 69 7a 65 6f | 66 20 28 20 65 6e 74 72 |y, sizeo|f ( entr|
|00000400| 79 20 29 2c 20 47 65 74 | 48 61 6e 64 6c 65 53 69 |y ), Get|HandleSi|
|00000410| 7a 65 20 28 20 68 55 73 | 65 72 49 6e 66 6f 20 29 |ze ( hUs|erInfo )|
|00000420| 20 2d 20 73 69 7a 65 6f | 66 20 28 20 57 45 55 73 | - sizeo|f ( WEUs|
|00000430| 65 72 49 6e 66 6f 45 6e | 74 72 79 20 29 20 29 20 |erInfoEn|try ) ) |
|00000440| 29 20 21 3d 20 6e 6f 45 | 72 72 20 29 0d 09 7b 0d |) != noE|rr )..{.|
|00000450| 09 09 67 6f 74 6f 20 63 | 6c 65 61 6e 75 70 20 3b |..goto c|leanup ;|
|00000460| 0d 09 7d 0d 0d 63 6c 65 | 61 6e 75 70 20 3a 0d 09 |..}..cle|anup :..|
|00000470| 72 65 74 75 72 6e 20 65 | 72 72 20 3b 0d 7d 0d 0d |return e|rr ;.}..|
|00000480| 70 61 73 63 61 6c 20 4f | 53 45 72 72 20 57 45 47 |pascal O|SErr WEG|
|00000490| 65 74 55 73 65 72 49 6e | 66 6f 20 28 20 57 45 53 |etUserIn|fo ( WES|
|000004a0| 65 6c 65 63 74 6f 72 20 | 74 61 67 2c 20 53 49 6e |elector |tag, SIn|
|000004b0| 74 33 32 20 2a 20 75 73 | 65 72 49 6e 66 6f 2c 20 |t32 * us|erInfo, |
|000004c0| 57 45 48 61 6e 64 6c 65 | 20 68 57 45 20 29 0d 7b |WEHandle| hWE ).{|
|000004d0| 0d 09 48 61 6e 64 6c 65 | 20 68 55 73 65 72 49 6e |..Handle| hUserIn|
|000004e0| 66 6f 20 3d 20 28 20 2a | 20 68 57 45 20 29 20 2d |fo = ( *| hWE ) -|
|000004f0| 3e 20 68 55 73 65 72 49 | 6e 66 6f 20 3b 0d 09 57 |> hUserI|nfo ;..W|
|00000500| 45 55 73 65 72 49 6e 66 | 6f 45 6e 74 72 79 20 2a |EUserInf|oEntry *|
|00000510| 20 70 45 6e 74 72 79 20 | 3b 0d 09 4f 53 45 72 72 | pEntry |;..OSErr|
|00000520| 20 65 72 72 20 3d 20 77 | 65 55 6e 64 65 66 69 6e | err = w|eUndefin|
|00000530| 65 64 53 65 6c 65 63 74 | 6f 72 45 72 72 20 3b 0d |edSelect|orErr ;.|
|00000540| 0d 09 2f 2f 09 6c 6f 6f | 6b 20 66 6f 72 20 74 68 |..//.loo|k for th|
|00000550| 65 20 73 70 65 63 69 66 | 69 65 64 20 74 61 67 20 |e specif|ied tag |
|00000560| 69 6e 20 74 68 65 20 75 | 73 65 72 20 69 6e 66 6f |in the u|ser info|
|00000570| 20 61 72 72 61 79 0d 09 | 66 6f 72 20 28 09 70 45 | array..|for (.pE|
|00000580| 6e 74 72 79 20 3d 20 28 | 20 57 45 55 73 65 72 49 |ntry = (| WEUserI|
|00000590| 6e 66 6f 45 6e 74 72 79 | 20 2a 20 29 20 2a 20 68 |nfoEntry| * ) * h|
|000005a0| 55 73 65 72 49 6e 66 6f | 20 3b 0d 09 09 09 70 45 |UserInfo| ;....pE|
|000005b0| 6e 74 72 79 20 2d 3e 20 | 74 61 67 20 21 3d 20 30 |ntry -> |tag != 0|
|000005c0| 20 3b 0d 09 09 09 70 45 | 6e 74 72 79 20 2b 2b 20 | ;....pE|ntry ++ |
|000005d0| 29 0d 09 7b 0d 09 09 69 | 66 20 28 20 70 45 6e 74 |)..{...i|f ( pEnt|
|000005e0| 72 79 20 2d 3e 20 74 61 | 67 20 3d 3d 20 74 61 67 |ry -> ta|g == tag|
|000005f0| 20 29 0d 09 09 7b 0d 09 | 09 09 2f 2f 09 74 61 67 | )...{..|..//.tag|
|00000600| 20 66 6f 75 6e 64 3a 20 | 73 65 74 20 72 65 73 75 | found: |set resu|
|00000610| 6c 74 20 63 6f 64 65 20 | 74 6f 20 6e 6f 45 72 72 |lt code |to noErr|
|00000620| 20 61 6e 64 20 62 72 65 | 61 6b 20 6f 75 74 20 6f | and bre|ak out o|
|00000630| 66 20 6c 6f 6f 70 0d 09 | 09 09 65 72 72 20 3d 20 |f loop..|..err = |
|00000640| 6e 6f 45 72 72 20 3b 0d | 09 09 09 62 72 65 61 6b |noErr ;.|...break|
|00000650| 20 3b 0d 09 09 7d 0d 09 | 7d 0d 0d 09 69 66 20 28 | ;...}..|}...if (|
|00000660| 20 75 73 65 72 49 6e 66 | 6f 20 21 3d 20 6e 69 6c | userInf|o != nil|
|00000670| 20 29 0d 09 7b 0d 09 09 | 2a 20 75 73 65 72 49 6e | )..{...|* userIn|
|00000680| 66 6f 20 3d 20 70 45 6e | 74 72 79 20 2d 3e 20 69 |fo = pEn|try -> i|
|00000690| 6e 66 6f 20 3b 0d 09 7d | 0d 0d 09 72 65 74 75 72 |nfo ;..}|...retur|
|000006a0| 6e 20 65 72 72 20 3b 0d | 7d 0d 00 00 00 00 00 00 |n err ;.|}.......|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000710| 00 00 31 00 45 9d ff ff | 24 00 0d e6 00 00 30 f8 |..1.E...|$.....0.|
|00000720| 74 d7 ff ff 24 00 11 c1 | 00 00 31 50 6f 2a ff ff |t...$...|..1Po*..|
|00000730| 11 57 45 55 73 65 72 53 | 65 6c 65 63 74 6f 72 73 |.WEUserS|electors|
|00000740| 2e 63 42 63 63 63 74 73 | 32 70 65 72 6f 6d 6c 6d |.cBcccts|2peromlm|
|00000750| 02 00 54 45 58 54 43 57 | 49 45 01 00 ff ff ff ff |..TEXTCW|IE......|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 ae 24 06 3b 00 00 | 06 2a 00 00 01 ac 3e 50 |...$.;..|.*....>P|
|00000780| 75 fc ff ff 24 00 30 99 | 00 00 3e 3c 51 f0 ff ff |u...$.0.|..><Q...|
|00000790| 24 00 34 74 00 00 3e 28 | 08 d5 ff ff 24 00 38 d7 |$.4t..>(|....$.8.|
|000007a0| 00 00 3e 08 37 ee ff ff | 24 00 3c bc 00 00 3d e4 |..>.7...|$.<...=.|
|000007b0| 62 a4 ff ff 24 00 45 9f | 00 00 3d d0 41 c8 ff ff |b...$.E.|..=.A...|
|000007c0| 24 00 4e 82 00 00 3c 5c | 20 60 ff ff 24 00 57 65 |$.N...<\| `..$.We|
|000007d0| 00 00 30 88 23 96 ff ff | 24 00 60 48 00 00 3f 44 |..0.#...|$.`H..?D|
|000007e0| 4b db ff ff 24 00 69 2b | 00 00 3c 8c 76 53 ff ff |K...$.i+|..<.vS..|
|000007f0| 24 00 72 0e 00 00 3f 58 | 49 76 ff ff 24 00 7a f1 |$.r...?X|Iv..$.z.|
|00000800| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000810| 07 9f d0 c8 03 b6 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+